package com.west.imclient.view;

import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

import com.west.imclient.listener.LoginActionListener;

public class LoginView extends JFrame{
	private JLabel label;
	private JTextField jtf;
	private JButton btn;
	
	public LoginView() {
		init();
	}
	
	public JTextField getJtf() {
		return jtf;
	}

	public void init() {
		label = new JLabel("IM Meeting Room", JLabel.CENTER);
		jtf = new JTextField();
		btn = new JButton("Login");
		
		add(label);
		add(jtf);
		add(btn);
		
		setTitle("IM Meeting Room Login");
		setSize(350, 400);
		setResizable(false);
		setLocationRelativeTo(null);
		setLayout(null);						
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		label.setBounds(50, 50, 250, 75);
		label.setFont(new Font("font1",Font.BOLD, 16));
		jtf.setBounds(50, 140, 250, 75);
		jtf.setFont(new Font("font1",0, 12));
		btn.setBounds(100, 230, 150, 45);
		btn.addActionListener(new LoginActionListener(this));
	}
}
